export const inarray = function (arr,val) {
  var ind=-1;
  if(arr instanceof Array){
    arr.forEach((value,index) => {
      if(value == val){
        ind = index
      }
    });
    return ind;
  }else {
    throw "不是一个Array"
  }
};
